void relax_one(double *u, double *rhs, int n)
//Gauss-Seidel relaxation for model problem. Updates the current value of the solution u[1..n] , using the right-hand side function rhs[1..n].
{
  int i;
  double h,h2;

  h=1.0/(n-1);
  h2=h*h;
  for (i=2;i<n;i++)
    u[i]=0.5*(u[i-1]+u[i+1]-h2*rhs[i]);
}
  
